import React, { useCallback, useState } from 'react'
import { FC, ReactElement } from 'react'

import Header from 'Components/Header'
import { useNavigate } from 'react-router-dom'
import { List, PullToRefresh } from 'antd-mobile'
import { sleep } from 'antd-mobile/es/utils/sleep'
import 'antd-mobile/es/global'

let current = 1

function getNextData() {
  const ret: string[] = []
  for (let i = 0; i < 18; i++) {
    ret.unshift(current.toString())
    current++
  }
  return ret
}

const Collection: FC = (): ReactElement => {
  const navigate = useNavigate()

  const handleNavigate = useCallback(() => {
    navigate(-1) // 回退
  }, [])

  return (
    <div className="collection">
      <Header title={'我的收藏'} back={handleNavigate} />
    </div>
  )
}

export default Collection
